import request from "@/utils/request";

// 查询项目列表
export function getAllKqOrdersList(query) {
  return request({
    url: "/work/allOrders/",
    method: "get",
    params: query
  });
}

// 查询项目详细
export function getKqOrder(id) {
  return request({
    url: "/work/allOrders/" + id + "/",
    method: "get"
  });
}

// 新增项目
export function addKqOrder(data) {
  return request({
    url: "/work/allOrders/",
    method: "post",
    data: data
  });
}

// 修改项目
export function updateKqOrder(data) {
  return request({
    url: "/work/allOrders/" + data.id + "/",
    method: "put",
    data: data
  });
}

// 导出项目
export function exportAllKqOrders(query) {
  return request({
    url: "/work/allOrders/export/",
    method: "get",
    params: query
  });
}

// 下载项目导入模板
export function importTemplate() {
  return request({
    url: "/work/allOrders/importTemplate/",
    method: "get"
  });
}

// 项目导入
export function importKqOrders(data) {
  return request({
    url: "/work/allOrders/importTemplate/",
    method: "post",
    data: data
  });
}
